package com.so.quartz.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.so.quartz.domain.SysJobLog;
import com.so.quartz.mapper.SysJobLogMapper;
import com.so.quartz.service.ISysJobLogService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 定时任务调度日志信息 服务层
 *
 * @author system
 */
@Service
public class SysJobLogServiceImpl extends ServiceImpl<SysJobLogMapper,SysJobLog>
        implements ISysJobLogService {

    @Override
    public Page<SysJobLog> selectJobLogList(Page<SysJobLog> page, SysJobLog jobLog) {
        return baseMapper.selectJobLogList(page,jobLog);
    }

    /**
     * 获取quartz调度器日志的计划任务
     *
     * @param jobLog 调度日志信息
     * @return 调度任务日志集合
     */
    @Override
    public List<SysJobLog> selectJobLogList(SysJobLog jobLog) {
        return baseMapper.selectJobLogList(jobLog);
    }


    /**
     * 清空任务日志
     */
    @Override
    public void cleanJobLog() {
        baseMapper.cleanJobLog();
    }
}
